package com.cyzy.controller;

import com.cyzy.service.NotificationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/SSE")
public class NotificationController {

    @Autowired
    private NotificationService notificationService;
    @PostMapping("/pushToUser")
    public void pushToUser(Integer userId, Object data) {
        notificationService.pushToUser(userId, data);
    }
}
